﻿using System.Linq;
using System.Windows.Controls;

namespace HtmlUtilities.UITest
{
    public partial class MainPage
    {
        public MainPage()
        {
            InitializeComponent();
        }

        private MainPageViewModel ViewModel
        {
            get { return Resources["ViewModel"] as MainPageViewModel; }
        }

        private void CommandChanged(object sender, SelectionChangedEventArgs e)
        {
            ViewModel.ExecuteCommand(e.AddedItems[0] as Command<string>);
        }
    }
}
